﻿using System;
using System.Data;
using System.Configuration;


namespace TonyNet4V1.Structs
{
	/// <summary>
	/// 实体变量和数据库的对应
	/// </summary>
	public struct DatabaseAndEntity
	{
		public string strType;
		public int nDatabaseOrder;
		public string strVarName;
		public string strFieldName;
		public bool bWriteToDB;		// 给字段是否可以写回数据库

		public DatabaseAndEntity(string strType, string strVarName, int nDatabaseOrder, string strFieldName)
		{
			this.strType = strType;
			this.strVarName = strVarName;
			this.nDatabaseOrder = nDatabaseOrder;
			this.strFieldName = strFieldName;
			bWriteToDB = true;
		}

		public DatabaseAndEntity(string strType, string strVarName, int nDatabaseOrder, string strFieldName, bool bWriteToDB)
		{
			this.strType = strType;
			this.strVarName = strVarName;
			this.nDatabaseOrder = nDatabaseOrder;
			this.strFieldName = strFieldName;
			this.bWriteToDB = bWriteToDB;
		}
	}
}